package com.lagou.config;

import com.alibaba.csp.sentinel.slots.block.BlockException;
import org.springframework.web.bind.annotation.PathVariable;

public class SentinelBlockHandler {


    /**
     * sentinel规则异常处理，必须用static修饰
     *
     * @param userId
     * @param blockException 用来接受规则
     * @return
     */
    public static Integer findResumeOpenStateBlock(Long userId, BlockException blockException) {
        return -100;
    }

    /**
     * java异常处理，必须用static修饰
     *
     * @param userId
     * @return
     */
    public static Integer findResumeOpenStateFallback(Long userId) {
        return -500;
    }
}
